home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / FGMISC10.ZIP / DEFS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-26  |  2.4 KB  |  123 lines

  1. #include "gui.h"
  2. #include "char.h"
  3. #include "common.h"
  4. #include "menu.h"
  5. #include <fastgraf.h>
  6.  
  7. #include <ctype.h>
  8. #include <string.h>
  9. #include <stdio.h>
  10. #include <stdlib.h>
  11. #include <dos.h>
  12. #include <io.h>
  13. #ifdef __TURBOC__
  14.    #include <alloc.h>
  15. #else
  16.    #include <malloc.h>
  17. #endif
  18.  
  19. #define BETWEEN(x,a,b) ((x >= a) && (x <= b))
  20. #define MAX(x,y) ((x) > (y)) ? (x) : (y)
  21. #define MIN(x,y) ((x) < (y)) ? (x) : (y)
  22.  
  23. #define OFF   0
  24. #define ON    1
  25.  
  26. #define ERR  -1
  27. #define OK    1
  28.  
  29. #define FALSE 0
  30. #define TRUE  1
  31.  
  32. #define VISUAL 0
  33. #define HIDDEN 1
  34.  
  35. #ifndef common_c
  36.    #define DECLARE extern
  37.    extern int redraw;
  38.    extern int mouse_limits[5];
  39. #else
  40.    #define DECLARE
  41.    int redraw = TRUE;
  42.    int mouse_limits[5] = {2,80,160,240,320};
  43. #endif
  44.  
  45. DECLARE int clockspeed;
  46. DECLARE int stall_time;
  47. DECLARE int background;
  48. DECLARE int old_mode;
  49.  
  50. DECLARE int white;
  51. DECLARE int black;
  52. DECLARE int blue;
  53. DECLARE int dkblue;
  54. DECLARE int grey;
  55. DECLARE int red;
  56.  
  57. DECLARE int buttons;
  58. DECLARE int mouse;
  59. DECLARE int xlimit, ylimit;
  60. DECLARE int xmouse, ymouse;
  61. DECLARE int main_option;
  62.  
  63. #define MENU_TOP    13
  64. #define MENU_BOTTOM 24
  65.  
  66. #define BS     8
  67. #define ENTER 13
  68. #define ESC   27
  69. #define SPACE 32
  70. #define F10   68
  71. #define CR          13
  72. #define SPACEBAR    32
  73.  
  74. #define UP_ARROW    72
  75. #define LEFT_ARROW  75
  76. #define RIGHT_ARROW 77
  77. #define DOWN_ARROW  80
  78.  
  79. #define CTRL_LEFT_ARROW  115
  80. #define CTRL_RIGHT_ARROW 116
  81.  
  82. #define HOME        71
  83. #define PGUP        73
  84. #define END         79
  85. #define PGDN        81
  86.  
  87. #define INSERT      82
  88. #define DELETE      83
  89.  
  90. #define BACKGROUND   0
  91. #define FOREGROUND   1
  92.  
  93. #define F1          59
  94. #define F2          60
  95. #define F3          61
  96. #define F4          62
  97. #define F5          63
  98. #define F6          64
  99. #define F7          65
  100. #define F8          66
  101. #define F9          67
  102. #define F10         68
  103.  
  104. /* stuff for menu operation */
  105.  
  106. typedef int (*PFI)();   /* pointer to an integer function */
  107.  
  108. #define ITEMS 4         /* number of items on main menu */
  109.  
  110. /* command structure */
  111.  
  112. typedef struct cmd
  113. {
  114.    PFI menu_func;       /* function to carry out the command */
  115.    char *menu_item;     /* the menu item as written on the screen */
  116.    int x1;              /* coordinates of location of menu_item */
  117.    int x2;
  118.    int next;
  119.    int prev;
  120. }  CMD;
  121.  
  122. extern CMD main_menu[4];
  123.